from deeprobust.graph.utils import *
from deeprobust.graph.data import Dataset


def load(name='cora'):
    # 加载数据集
    data = Dataset(root=r'./datas/', name=name, setting='nettack', seed=0)
    adj, features, labels = data.adj, data.features, data.labels  # 邻接矩阵， 特征向量， 标签
    idx_train, idx_val, idx_test = data.idx_train, data.idx_val, data.idx_test  # 分出训练集和测试集
    idx_unlabeled = np.union1d(idx_val, idx_test)
    # print(features.shape[1], labels.max().item() + 1)

    return adj, features, labels, idx_train, idx_val, idx_test, idx_unlabeled
